﻿@model Senbo.Areas.Admin.Models.ViewDatas.Category_EditViewData
@{
    ViewBag.Title = "Edit";
}
@section HeaderContent{
    <script type="text/javascript">
        window.onbeforeunload = function () {
            if (g_blnCheckUnload == false) {
                return "确定离开此页面吗?未保存的数据丢失！";
            }
        }
    </script>
}
<div class="content-box-header">
    <h3>
        @(Model.IsEdit ? "编辑" : "新增")类别</h3>
    <ul class="content-box-tabs">
        <li><a id="tt" href="@Url.Action("Index", "Category")">类别列表</a></li>
        <li><a href="#" class="default-tab">@(Model.IsEdit ? "编辑" : "新增")类别</a></li>
    </ul>
    <div class="clear">
    </div>
</div>
<div class="content-box-content">
    <div class="tab-content">
        @using (Html.BeginForm())
        {
            @Html.HiddenFor(model => model.Category.Id)
            <fieldset>
                <p>
                    <span>ID：</span>
                    @Model.Category.Id
                </p>
                <p>
                    <span><span class="red">*</span>@Html.LabelFor(model => model.Category.Name)：</span>
                    @Html.TextBoxFor(model => model.Category.Name, new { @class = "text-input w200-input datepicker" })
                    @Html.ValidationMessageFor(model => model.Category.Name)
                </p>
                @if (Model.IsEdit)
                {
                    <p>
                        <span>@Html.LabelFor(model => model.Category.AddTime)：</span>
                        @Model.Category.AddTime.ToString()
                        @Html.HiddenFor(model => model.Category.AddTime)
                    </p>
                }
                <p>
                    <input class="button" type="submit" value="确认" @*onclick="submit_click();"*@ />
                    <a href="javascript:history.go(-1)">取消</a>
                </p>
            </fieldset>
        }
        <div class="clear">
        </div>
    </div>
</div>
